Japanese Patent Application Publication No. 2010-282624 discloses a technology which controls a printer to print a document received from a portable device. The printer displays an optical code according to an optical code stored on the printer itself. The portable device captures an image of the optical code displayed on the printer and transmits this code together with the document to a server. The server transmits the document to the corresponding printer based on the optical code, and the printer prints the document received from the server.